package com.zhaorujie.rpx.demo.provider.service;

import com.zhaorujie.rpc.core.remoting.provider.annotain.RpcService;
import com.zhaorujie.rpc.demo.api.DemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author 赵汝杰
 * @version v1.0
 * @description DemoServiceImpl
 * @date 2024/3/6
 **/
@RpcService(timeout = 500)
public class DemoServiceImpl implements DemoService {

    private static Logger logger = LoggerFactory.getLogger(DemoServiceImpl.class);

    @Override
    public String rpcRemote() {
//        try {
//            Thread.sleep(2000);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }
        String s = "rpcRemote " + System.currentTimeMillis();
        logger.info(s);
        return s;
    }
}
